package my.edu.model.bills.pendingBills.controller;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import my.edu.model.bills.pendingBills.service.IPendingBillsService;
import my.edu.common.domain.Response;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/pendingBills")
@Tag(name = "待付款账单接口")
public class PendingBillsController {

    @Autowired
    IPendingBillsService pendingBillsService;

    @GetMapping
    @RequiresPermissions("pendingBill:get")
    @Operation(summary = "获取待审核账单")
    public Response getPendingBills(){
        Map<String, List> pendingBills = pendingBillsService.getPendingBills();
        return Response.success(pendingBills);
    }
}
